package com.joysuch.wwyt.bp.bean;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.joysuch.wwyt.core.bean.BaseAttachmentBean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author ZhangDong
 * @Date 2021/1/12 15:19
 */
@Data
public class BpDeviceFacilityDetectRecordBean {

    private Long id;
    @ApiModelProperty("设备装置id")
    @NotNull(message = "deviceFacilityId cannot be null")
    private Long deviceFacilityId;
    @ApiModelProperty("检测日期")
    @NotNull(message = "检测日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate detectDate;
    @ApiModelProperty("登记时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "登记时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime registerTime;
    @ApiModelProperty("内部检测人")
    private Long innerUserId;
    @ApiModelProperty("内部检测人姓名")
    private String innerUserName;
    @ApiModelProperty("外部检测人姓名")
    private String outerUserName;
    @ApiModelProperty("所属部门")
    private Long departId;
    @ApiModelProperty("所属部门名称")
    private String departName;
    @ApiModelProperty("外部单位名称")
    private String outerUnitName;
    @ApiModelProperty("登记人")
    private Long registerUserId;
    @ApiModelProperty("登记人姓名")
    private String registerUserName;
    @ApiModelProperty("附件")
    private BaseAttachmentBean attachmentBean;
    @ApiModelProperty("检测内容")
    private String detectContent;
    @ApiModelProperty("检测结果")
    private String detectResult;
    @ApiModelProperty("检测状态")
    @NotEmpty(message = "检测状态不能为空")
    private String detectStatus;
    //下次检测日期
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date detectValidityDate;

}
